import java.util.Scanner;

public class JudgeString {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String str = sc.nextLine();
            boolean result = judge(str);
            // 第二种是利用正则表达式 推荐
            // boolean result = jud(str);
            System.out.println(result);
        }
    }

    public static boolean judge(String str) {
        char[] arr = str.toCharArray();
        if (arr[0] >= '0' && arr[0] <= '9') {
            return false;
        } else {
            for (int i = 1; i < arr.length; i++) {
                if ((arr[i] >= 'A' && arr[i] <= 'Z') || (arr[i] >= 'a' && arr[i] <= 'z') || arr[i] == '_' || arr[i] == '$' || (arr[i] >= '0' && arr[i] <= '9') || (arr[i] >= 19968 && arr[i] <= 40869)) {
                }else{
                    return false;

                }
            }
            return true;
        }
    }

    public static boolean jud(String str){
        String answer = "^[A-Za-z_$|\u4e00-\u9fa5]{1}[\\w$|\u4e00-\u9fa5]{0,}$";
        // System.out.println(str.matches(answer));
        return str.matches(answer);
    }
}
